{__NOLAYOUT__}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="./Public/Js/jquery.min.js"></script>
    <script type="text/javascript" src="./Public/Js/jquery.artDialog.js?skin=default"></script>
    <script type="text/javascript" src="./Public/Js/iframeTools.js"></script>
    <link rel='stylesheet' type='text/css' href='./Public/Css/style.css'>
    <link rel='stylesheet' type='text/css' href='./Public/fonts/iconfont.css'>
    <title>{:L('welcome')}{:L('system_name')}</title>
</head>
<body>
<div id="header" class="header">
    <div class="logo"><span class="logo_cn">网站管理系统</span><span class="logo_en">Manage System</span></div>

    <div class="nav">&nbsp;&nbsp;&nbsp;&nbsp;{:L('welcome_user')}{$Think.session.username}  <i>|</i> [{$usergroup}]  <i>|</i> [<a href="{:U('Login/logout')}" target="_top">{:L('logout')}</a>]  <i>|</i> <a href="{$site_url}" target="_blank">{:L('home_index')}</a>  <i>|</i> <a href="javascript:void(0);"  onclick="gocacheurl();" >{:L('UPDATE_CACHE')}</a></div>
</div>


<div id="Main_content">

    <div id="MainBox" >
        <div class="main_box">
            <div class="navList" id="TabNav">
                <a href="javascript:;" class="home current N_Tab" data-href="?g=Admin&m=Index&a=main&menuid=42" data-id="42" onclick=" menutype(42);">后台首页<i class="Refresh"></i></a>
            </div>
            <div id="main_loading"><img src="./Public/Images/loading.gif" width="28" height="28" alt=""> {:L('load_page')}</div>
            <div class="ifranme" id="iframe">
                <iframe name="main" id="Main" src='{:U("Index/main")}' data-id="42" frameborder="false" scrolling="auto"  width="100%" height="auto" allowtransparency="true" ></iframe>
            </div>
        </div>
    </div>

    <div id="leftMenuBox">
        <div id="leftMenu">
            <volist name="menu" id="r" key="n">
                <dl id="nav_{$r['bnav']['id']}" {if $n==1}class="on"{/if}>
                    <dt><a href="javascript:void(0);"><span class="iconfont icon-{$n}"></span>{$r['bnav']['name']}<i></i></a></dt>
                    <dd {if $n==1}style="display:block;"{/if}>
                        <ul>
                            <volist name="r[nav]" id="item">
                                <li id="li_{$item['id']}" data-id="{$item[id]}"><span><a href="{:U($item['model'].'/'.$item['action'],$item['data'])}" class="name" target="main" onclick="menutype('{$item['id']}')"><i></i>{$item['name']}</a>{if $r[bnav]['model']=='Category'}<a href="{:U($item['model'].'/add',$item['data'])}" id="{$i}" class="add" target="main">{:L(add)}</a>{/if}</span></li>
                            </volist>
                        </ul>
                    </dd>
                </dl>
            </volist>
        </div>
    </div>

</div>
<script language="JavaScript">
    if(!Array.prototype.map)
        Array.prototype.map = function(fn,scope) {
            var result = [],ri = 0;
            for (var i = 0,n = this.length; i < n; i++){
                if(i in this){
                    result[ri++]  = fn.call(scope ,this[i],i,this);
                }
            }
            return result;
        };
    var getWindowWH = function(){
        return ["Height","Width"].map(function(name){
            return window["inner"+name] ||
                document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
        });
    }
    window.onload = function (){
        if(!+"\v1" && !document.querySelector) { //IE6 IE7
            document.body.onresize = resize;
        } else {
            window.onresize = resize;
        }
        function resize() {
            wSize();
            return false;
        }
    }
    function wSize(){
        var str=getWindowWH();
        var strs= new Array();
        strs=str.toString().split(","); //字符串分割
        var h = strs[0];
        $('#Main').height(h);
    }
    wSize();

    //function gourl(n,url){
    //    $('#leftMenu ul li').removeClass('on');
    //	$('#li_'+n).addClass('on');
    //	window.main.location.href=url;
    //    var main = $('#Main');
    //    main.hide();
    //    $("#main_loading").show();
    //    var isOnLoad = true;
    //    main.attr("src", url);
    //    main.load(function() {
    //        isOnLoad = false;
    //        main.show();
    //    });
    //}
    function leftMenu(){
        $("#leftMenu>dl>dt").click(function(){
            var taht = $(this);
            var parentObj = taht.parent("dl");
            if(parentObj.hasClass("on")){
                taht.siblings("dd").slideUp(300);
                parentObj.removeClass("on");
            }else{
                taht.siblings("dd").slideDown(300);
                parentObj.addClass("on").siblings().removeClass("on").find("dd").slideUp(300)
            }
        })
    }
    leftMenu();
    function gocacheurl(){
        mainurl = window.main.location.href;
        window.main.location.href= "{:U('Admin/Index/cache')}&forward="+encodeURIComponent(mainurl);
    }

    //
    //function toggleMenu(doit){
    //	if(doit==1){
    //		$('#Main_drop a.on').hide();
    //		$('#Main_drop a.off').show();
    //		$('#MainBox .main_box').css('margin-left','24px');
    //		$('#leftMenu').hide();
    //	}else{
    //		$('#Main_drop a.off').hide();
    //		$('#Main_drop a.on').show();
    //		$('#leftMenu').show();
    //		$('#MainBox .main_box').css('margin-left','224px');
    //	}
    //}




</script>
<script src="/Public/Js/WindowTab.js"></script>
</body>
</html>